/**
 * @ClassName FactTest
 * @Description 递归求 N 的阶乘
 * @Author 李明忠
 * @Date 2025/5/17 23:10
 * @Version 1.0
 */
public class FactTest {
    public static int fac(int n) {
        if (n == 1)
            return 1;
        else
            return n * fac(n-1);
    }
    public static void main(String[] args) {
        System.out.println(fac(5));
    }
}
